feat(view): composable, URL-syncable dashboard config - #6
Merged
Conversation
Define LiveConfig + LiveDataToolViewConfig (extends DataToolViewConfig with a live sub-config) and adapt LiveDataToolView to the new base binding: config_cls, _coerce_config, and a _apply_config override that resizes buffers / retimes the periodic callback before delegating to the base. Drops the removed JSON-editor path (_on_config_editor_change) and the removed LiveDashboardConfig import. Add optional url_sync/url_mode passthrough and enable it in the live example (COMPRESSED_BASE64). Export the new config classes from the view package. Bump the base dependency to >=0.42.8.post1000002004004 (the config release). Regenerate docs screenshots/GIF with a synthetic address bar showcasing the URL-synced config, and update the README example.
Switch the live example (and README) from COMPRESSED_BASE64 to PLAIN_KEYS so the URL-synced config is legible in the address bar; the live tree is tiny, so the flattened dot-path params stay short. Regenerate the docs screenshots/GIF to show the readable URL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adapts the lab live view to the new base dashboard-config binding (opensemantic.base v0.42.8.post1000002004004), which removed the JSON-editor path and
LiveDashboardConfig.Changes
_live_dashboard.py):LiveConfig(buffer_size / update_interval_ms / history_seconds) andLiveDataToolViewConfig(DataToolViewConfig)adding alivesub-config - mirroring howLiveDataToolViewextendsDataToolViewwith a live tab.LiveDataToolViewon the new binding:config_cls,_coerce_config, and a_apply_configoverride that resizes the rolling buffers / retimes the periodic callback, then delegates to the base. Removes_on_config_editor_changeand theLiveDashboardConfigimport.url_sync/url_modepassthrough; enabled in the live example inPLAIN_KEYSmode (human-readable flattened query params, legible in the address bar).LiveConfig,LiveDataToolViewConfig,LiveDataToolViewfromopensemantic.lab.view.opensemantic.base>=0.42.8.post1000002004004.Test
_coerce_configupgrade + UrlConfig (all modes) verified forLiveDataToolViewConfig.docs/generate_screenshots.py): archive + live plots render with real OPC UA data; PLAIN_KEYS URL-sync restore confirmed on reload.